﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddVote.aspx.cs" Inherits="Business_Booking_AddVote" Theme="normal"%>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>发起投票</title>
    <link href="../../css/MessageTable.css" rel="stylesheet" type="text/css" />
   <style type="text/css">
    .modalBackground {
    background-color:Gray;
    filter:alpha(opacity=70);
    opacity:0.7;
    } 
   .buttons
   {
     border:1px solid #C9DEEC; 
     background-color:#FFFFFF; 
     margin-left:0px;
   } 
}
   </style> 
</head>
<body style="background-color:#fcf6ec">
    <form id="form1" runat="server" ><%--method="post">--%>
    
    <asp:ScriptManager ID="Scriptmanager1" runat="server" EnableScriptGlobalization="true"
            EnableScriptLocalization="true">
    </asp:ScriptManager>
    <div class="normalnav">
                <div class="normalcontent">
                    <span style="color: #ffffff">订餐管理>>>投票管理>>></span><span style="color: #f6ff00">发起投票</span>
                </div>
            </div>
    <div>
           <%-- <table width="100%" border="0" cellpadding="0" cellspacing="0" class="toptable">
                <tr>
                    <td class="sysmain_navi" style="padding-left: 14px; width:57%; height:30px;" >
                        发起投票</td>
                    <td class="topnavichar" style="padding-left: 14px; width:43%;">
                    </td>
                </tr>
            </table>--%>
            <table border="2"  cellpadding="5" cellspacing="1" bordercolor="#edc789"
                style="width:98%; text-align:center; background-color:#ffffff;border-collapse:collapse; margin-left:10px; top:40px; position:absolute;">
                <!--投票名称-->
                <%--<tr>
                    <td align="right" style="width: 30%">
                        <span style="color: Red;">*</span>投票名称：</td>
                    <td style="width:70%; text-align:left; border:1px;" colspan="3">
                        <asp:TextBox ID="tb_VoteName" runat="server" Width="250px" MaxLength="30" BorderWidth="1px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequirestyleLabelClassName" runat="server" ControlToValidate="tb_VoteName"
                            Display="Dynamic" ErrorMessage="<span class=reshow>(*)请填写投票名称</span>"></asp:RequiredFieldValidator>
                    </td>
                </tr>--%>
                
                <!--投票主题-->
                <tr>
                    <td align="right" style="width: 30%">
                        <span style="color: Red;">*</span>投票主题：</td>
                    <td style="width:70%; text-align:left; border:1px;" colspan="3">
                        <asp:TextBox ID="tb_VoteContent" runat="server" Width="250px" MaxLength="130" BorderWidth="1px" Height="80px" TextMode="MultiLine"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tb_VoteContent"
                            Display="Dynamic" ErrorMessage="<span class=reshow>(*)请填写投票主题</span>"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                
                 <!--投票选项-->
                <tr>
                    <td align="right" style="width: 30%">
                        <span style="color: Red;">*</span>投票选项：</td>
                    <td style="width:70%; text-align:left; border:1px;" colspan="3">
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                            <ContentTemplate>
                            
                        <span>投票选项个数 ：</span>
                        <asp:DropDownList ID="ddl_Options" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddl_Options_SelectedIndexChanged">
                            <asp:ListItem Text="2" Value="2"></asp:ListItem>
                            <asp:ListItem Text="3" Value="3"></asp:ListItem>
                            <asp:ListItem Text="4" Value="4"></asp:ListItem>
                            <asp:ListItem Text="5" Value="5"></asp:ListItem>
                            <asp:ListItem Text="6" Value="6"></asp:ListItem>
                            <asp:ListItem Text="7" Value="7"></asp:ListItem>
                            <asp:ListItem Text="8" Value="8"></asp:ListItem>
                            <asp:ListItem Text="9" Value="9"></asp:ListItem>
                            <asp:ListItem Text="10" Value="10"></asp:ListItem>
                            <asp:ListItem Text="11" Value="11"></asp:ListItem>
                            <asp:ListItem Text="12" Value="12"></asp:ListItem>
                            <asp:ListItem Text="13" Value="13"></asp:ListItem>
                            <asp:ListItem Text="14" Value="14"></asp:ListItem>
                            <asp:ListItem Text="15" Value="15"></asp:ListItem>
                            <asp:ListItem Text="16" Value="16"></asp:ListItem>
                            <asp:ListItem Text="17" Value="17"></asp:ListItem>
                            <asp:ListItem Text="18" Value="18"></asp:ListItem>
                            <asp:ListItem Text="19" Value="19"></asp:ListItem>
                            <asp:ListItem Text="20" Value="20"></asp:ListItem>
                        </asp:DropDownList>
                        <span>个</span>
                        <br />
                         
                        <asp:Panel ID="Pan_Options" runat="server">
                            <asp:Label ID="lbl_Option1" runat="server" Text="选项1:"></asp:Label>
                            <asp:TextBox ID="tb_Option1" runat="server"></asp:TextBox>
                            <asp:Label ID="lbl_Option2" runat="server" Text="选项2:"></asp:Label>
                            <asp:TextBox ID="tb_Option2" runat="server"></asp:TextBox>
                        
                            <asp:Label ID="lbl_Option3" runat="server" Text="选项3:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option3" runat="server" Visible="false"></asp:TextBox>
                        <br />
                            <asp:Label ID="lbl_Option4" runat="server" Text="选项4:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option4" runat="server" Visible="false"></asp:TextBox>
                        
                            <asp:Label ID="lbl_Option5" runat="server" Text="选项5:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option5" runat="server" Visible="false"></asp:TextBox>
                            <asp:Label ID="lbl_Option6" runat="server" Text="选项6:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option6" runat="server" Visible="false"></asp:TextBox>
                        <br />
                            <asp:Label ID="lbl_Option7" runat="server" Text="选项7:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option7" runat="server" Visible="false"></asp:TextBox>
                            <asp:Label ID="lbl_Option8" runat="server" Text="选项8:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option8" runat="server" Visible="false"></asp:TextBox>
                        
                            <asp:Label ID="lbl_Option9" runat="server" Text="选项9:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option9" runat="server" Visible="false"></asp:TextBox>
                        <br />
                            <asp:Label ID="lbl_Option10" runat="server" Text="选项10:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option10" runat="server" Visible="false"></asp:TextBox>
                        
                            <asp:Label ID="lbl_Option11" runat="server" Text="选项11:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option11" runat="server" Visible="false"></asp:TextBox>
                            <asp:Label ID="lbl_Option12" runat="server" Text="选项12:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option12" runat="server" Visible="false"></asp:TextBox>
                        <br />
                            <asp:Label ID="lbl_Option13" runat="server" Text="选项13:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option13" runat="server" Visible="false"></asp:TextBox>
                            <asp:Label ID="lbl_Option14" runat="server" Text="选项14:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option14" runat="server" Visible="false"></asp:TextBox>
                        
                            <asp:Label ID="lbl_Option15" runat="server" Text="选项15:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option15" runat="server" Visible="false"></asp:TextBox>
                        <br />
                            <asp:Label ID="lbl_Option16" runat="server" Text="选项16:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option16" runat="server" Visible="false"></asp:TextBox>
                        
                            <asp:Label ID="lbl_Option17" runat="server" Text="选项17:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option17" runat="server" Visible="false"></asp:TextBox>
                            <asp:Label ID="lbl_Option18" runat="server" Text="选项18:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option18" runat="server" Visible="false"></asp:TextBox>
                        <br />
                            <asp:Label ID="lbl_Option19" runat="server" Text="选项19:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option19" runat="server" Visible="false"></asp:TextBox>
                            <asp:Label ID="lbl_Option20" runat="server" Text="选项20:" Visible="false"></asp:Label>
                            <asp:TextBox ID="tb_Option20" runat="server" Visible="false"></asp:TextBox>   
                         
                        </asp:Panel>                        
                            </ContentTemplate>
                        </asp:UpdatePanel>
                        <asp:RequiredFieldValidator ID="rfv_1" runat="server" 
                            ErrorMessage="请填写投票选项1" ControlToValidate="tb_Option1" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RequiredFieldValidator ID="rfv_2" runat="server" 
                            ErrorMessage="请填写投票选项2" ControlToValidate="tb_Option2" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:Label ID="lbl_OptionValidator" runat="server" Text=""></asp:Label></td>
                </tr>
                
                <!--添加手机号码-->
                <tr>
                    <td align="right" style="width: 30%">
                        <span style="color: Red; overflow:hidden;">*</span>
                        <span style="overflow:hidden;">添加手机号码：</span></td>
                    <td style="width:200px; text-align:left; border-right:0px;" colspan="2">
                        <asp:TextBox ID="tb_Mobile" runat="server" Width="250px" MaxLength="11" BorderWidth="1px" Height="88px" TextMode="MultiLine"></asp:TextBox>
                             
                    </td>
                    <td style="vertical-align:top; text-align:left; border-left:0px;">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="tb_Mobile"
                            Display="Dynamic" ErrorMessage="请选择或填写至少一个号码！"></asp:RequiredFieldValidator></td>
                </tr>

                <!--参与人-->
                <tr>
                    <td align="right" style="width: 30%; height:150px;" valign="top">
                        <span style="color: Red;">*</span>参与人：</td>
                    <td style="width:200px; text-align:left; border:0px;" colspan="2">
                        <div style="display:inline;">                        <asp:ListBox ID="ListBox1" runat="server" Width="252px" Height="146px" SelectionMode="Multiple" CssClass="ThinkBorder"></asp:ListBox>
                        </div>     
                    </td>
                    <td style="border:0px; text-align:left; vertical-align:top;">
                        <asp:CheckBox ID="cb_SelectAll" runat="server" Text="全选"/>
                        <br />
                        <asp:Button ID="btn_AddContact" runat="server" Text=" 添加联系人 " OnClick="btn_AddContact_Click" CssClass="buttons" CausesValidation="false"/>
                           <br />
                    </td>
                </tr>
                
                <!--起止时间-->
                <tr>
                    <td align="right" style="width: 30%; ;">
                        <span style="color: Red;">*</span>起止时间：
                        
                    </td>
                    <td style="width:70%; text-align:left;" colspan="3">
                        <asp:TextBox ID="txtDateA" Width="70px" runat="server" ></asp:TextBox>
                        <asp:ImageButton runat="Server" ID="Image1" ImageUrl="~/Images/Calendar_scheduleHS.png" 
                            CausesValidation="false" AlternateText="点击选择日期"/>
                        <ajaxToolkit:CalendarExtender ID="customCalendarExtender" runat="server" TargetControlID="txtDateA"
                            Format="yyyy-MM-dd" PopupButtonID="Image1"/>
                        <%--<asp:DropDownList ID="ddl_StartHour" runat="server">
                        </asp:DropDownList>时--%>
                        至：
                        <asp:TextBox ID="txtDateB" Width="70px" runat="server"></asp:TextBox>           
                        <asp:ImageButton runat="Server" ID="Image2" ImageUrl="~/Images/Calendar_scheduleHS.png" 
                            CausesValidation="false" AlternateText="点击选择日期" />
                        <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtDateB"
                            Format="yyyy-MM-dd" PopupButtonID="Image2" /> 
                        <%--<asp:DropDownList ID="ddl_EndHour" runat="server">
                        </asp:DropDownList>时    --%>
                        <span style="color: #426F98; font-family: 宋体; font-size: 12px">
                            <asp:Label ID="lbldate" runat="server" Text="正确的日期格式为:YYYY-MM-DD"></asp:Label>     
                        </span>      
                        <br />
                         <!--验证-->
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                            ErrorMessage="请填写投票开始时间！" ControlToValidate="txtDateA" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                            ErrorMessage="<span style='color:red; font-size:13px;'>请填写投票结束时间！</span>" ControlToValidate="txtDateB" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                                 ErrorMessage="<span style='color:red; font-size:13px;'>开始日期格式不正确！</span>" ControlToValidate="txtDateA" Display="Dynamic" 
                                 ValidationExpression="^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$"></asp:RegularExpressionValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
                                 ErrorMessage="<span style='color:red; font-size:13px;'>结束日期格式不正确！</span>" ControlToValidate="txtDateB" Display="Dynamic" 
                                 ValidationExpression="^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$"></asp:RegularExpressionValidator>
                        <%--<asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="结束时间必须大于开始时间！"></asp:CompareValidator>--%>       
                        
                       <asp:Label ID="lbl_SendTimeValidator" runat="server" Text=""></asp:Label></td>
                </tr>
                
                 <!--发送方式-->
                <tr>
                    <td align="right" style="width: 30%;" valign="top">
                        <span style="color: Red;">*</span>发送方式：</td>
                    <td style="text-align:left;" colspan="3">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>

                        <asp:RadioButton ID="rb_Now" runat="server" Text="立即" GroupName="SendTime" AutoPostBack="true" OnCheckedChanged="rb_Now_CheckedChanged" Checked="true"/>
                        
                        <asp:RadioButton ID="rb_Timing" runat="server" Text="定时" GroupName="SendTime" OnCheckedChanged="rb_Timing_CheckedChanged" AutoPostBack="true"/>
                            <%--<div runat="server" id="div_Timing">--%>
                            <asp:TextBox ID="tb_SendTime" Width="70px" runat="server" ></asp:TextBox>
                            <asp:ImageButton runat="Server" ID="ibtn_SendTime" ImageUrl="~/Images/Calendar_scheduleHS.png" 
                                CausesValidation="false" AlternateText="点击选择日期"/>
                            <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="tb_SendTime"
                                Format="yyyy-MM-dd" PopupButtonID="ibtn_SendTime"/>
                            <asp:DropDownList ID="ddl_SendHour" runat="server">
                            </asp:DropDownList>时<asp:DropDownList ID="ddl_SendMinite" runat="server">
                            </asp:DropDownList>分
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"
                                 ErrorMessage="发送日期格式不正确！" ControlToValidate="tb_SendTime" Display="Dynamic" 
                                 ValidationExpression="^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$">
                            </asp:RegularExpressionValidator>
                                <%--                            <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" 
                                TargetControlID="RegularExpressionValidator3"> 
                            </ajaxToolkit:ValidatorCalloutExtender>  --%><%--</div>--%>
                         </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                   
                </tr>
                
                <tr>
                    <td align="left" class="navi_link" colspan="4">
                        <asp:ImageButton ID="submit" runat="server" ImageUrl="../../Images/Basic/tianjia.gif"
                            ToolTip="提交" OnClick="btnSave_Click" CausesValidation="true"/>提交
                        <asp:ImageButton ID="butrReset" runat="server" ImageUrl="../../Images/Basic/fanhui.gif"
                            CausesValidation="False" ToolTip="返回" OnClick="butrReset_Click" />返回
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>


</html>
